/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import { Request, Response } from 'express';
import { ResponseItem, responseSuccess } from '../utils';
import type { TableListItem } from '@/pages/vehicleCall/logout/config.d';
import Mock from 'mockjs';

const Random = Mock.Random;
export default {
  'POST /queuecall/LogisticsCenter/userList': (req: Request, res: Response) => {
    const data: TableListItem[] = Mock.mock({
      'list|1-30': [
        {
          id: '@id()',
          name: Random.cname(),
          mobile: Random.cname(),
          job_type: '2',
          job: null,
          create_time: '2022-05-18 12:35:03',
          updated_time: '2022-05-27 11:42:09',
          role: '司机',
        },
      ],
    });

    const result: ResponseItem = {
      code: 0,
      msg: '成功',
      data,
    };
    return res.json(result);
  },
  'POST /queuecall/LogisticsCenter/purge': (req: Request, res: Response) =>
    responseSuccess(req, res),
};
